package com.weitu.threeSimultaneities.occHealth.service.impl;

import com.weitu.threeSimultaneities.occHealth.entity.OccHealthFsd;
import com.weitu.threeSimultaneities.occHealth.mapper.OccHealthFsdMapper;
import com.weitu.threeSimultaneities.occHealth.service.OccHealthFsdService;
import java.util.List;
import java.util.Map;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
public class OccHealthFsdServiceImpl implements OccHealthFsdService {
    @Autowired
    private OccHealthFsdMapper occHealthFsdMapper;


    @Override
    public OccHealthFsd selectBySubjectId(String id) {
        return this.occHealthFsdMapper.selectBySubjectId(id);
    }

    @Override
    public int deleteBySubjectId(String id) {
        return this.occHealthFsdMapper.deleteBySubjectId(id);
    }

    @Override
    @Transactional
    public int insertSelective(Map<String,Object> paramMap) {
        this.occHealthFsdMapper.deleteBySubjectId(paramMap.get("subjectId").toString());
        return this.occHealthFsdMapper.insertSelective(paramMap);
    }
}